package cn.seocoo.platform.api.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author duanpj
 * @Data 2019-04-09
 * @Desc 查询对象基类
 */
@ApiModel(value="封装查询基础字段")
@Data
public class BaseQuery {
  /**
   * 主键
   */
  private Integer id;

  private String uuid;

  @ApiModelProperty(value = "每页条数 默认10")
  private Integer pageSize = 10;

  @ApiModelProperty(value = "当前页数 默认1")
  private Integer pageNum = 1;

  @ApiModelProperty(value = "开始时间")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date startDate;

  @ApiModelProperty(value = "结束时间")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endDate;

  @ApiModelProperty(value = "排序字段 可忽略")
  private String orderBy;

}